home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: First Vote
- Date: Tue, 05 Jul 1994 11:01:33 +1000
- From: Warwick Allison <warwick@cs.uq.oz.au>
- Precedence: bulk
-
- Timothy Miller wrote:
-
- >There was discussion of busy-waiting... well, SOMETHING has to busy wait,
- >whether it's your app with a timer or 1-pixel rectangle, or it's the OS
- >which is given only mouse coordinates.
-
- Incorrect. Potentially, the AES can use a centralized rectangle sorting
- algorithm, thus only checking a small number of rectangles.
-
-
- >When you use rectangles, the OS
- >has to check the position of the mouse against the rectangles for every
- >mouse movement. I wouldn't think that would have a whole lot less
- >overhead than having your program track a 1-pixel rectangle.
-
- Of COURSE it is! If EVERY APPLICATION is asking the AES to tell it whenever
- the mouse moves by 1 pixel, **then doing a objc_find whenever it does**, the
- system will crawl to a halt whenever the mouse moves! By intelligently
- choosing a rectangle (or 2) that it a larger equivalence class of mouse
- positions (ie. positions for which objc_find results in the same value),
- you'll reduce the number of objc_find calls by a factor of 100! Also,
- with a 1-pixel tracking scheme, the faster the machine (eg. Medusa), the
- more CPU is burned doing objc_finds (since more mouse motions will be
- caught - on a slow machine, the mouse might move 100 pixels between events,
- thus losing the maximal-rectangle advantage).
-
-
- --
- Warwick
-